package core.service.adapter
{
import flash.utils.Dictionary;

public class DataAdapterMap
{
	private static const MAP:Dictionary = new Dictionary(true);
	{
		CONFIG::release
		{
			MAP["player_info"] = PlayerInfoDataAdapter;
		}	
		
		CONFIG::debugging
		{
			MAP["player_info"] = PlayerInfoDebugDataAdapter;
		}
	}
	
	public static function getAdapter(adapterName:String):IDataAdapter
	{
		var ref:Class = MAP[adapterName];
		
		if (ref == null) return null;
		
		var adapter:IDataAdapter = new ref() as IDataAdapter;
		return adapter;
	}
}
}